//
//  main.m
//  SpriteViewer_OSX
//
//  Created by Michael Kron on 3/4/15.
//  Copyright (c) 2015 Michael Kron. All rights reserved.
//

#include <spriteViewerProgram.h>

#include <stdio.h>
#include <string.h>

int main(int argc, const char * argv[]) {
	static const char* WORKING_DIR_OPTION = "workingDir=";
	const char* workingDir = NULL;
	
	for (int i = 0; i < argc; ++i)
	{
		const char* arg = argv[i];
		if (strstr(arg, WORKING_DIR_OPTION) == arg)
		{
			workingDir = arg + strlen(WORKING_DIR_OPTION);
			printf("workingDir: %s\n", workingDir);
		}
	}
	
    SpriteViewerProgram* pProgram = new SpriteViewerProgram();
    pProgram->Init();
    pProgram->Run();
    delete pProgram;
    
    return 0;
}
